/////////////////////////////////////////////////////////////////////////////
// Name:        ProxyPanel.cpp
// Purpose:     
// Author:      yospaly
// Modified by: 
// Created:     05/01/2010 15:25:00
// RCS-ID:      
// Copyright:   Copyright (C) 2008, yospaly
// Licence:     
/////////////////////////////////////////////////////////////////////////////

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "ProxyPanel.h"

////@begin XPM images
////@end XPM images


/*!
 * ProxyPanel type definition
 */

IMPLEMENT_DYNAMIC_CLASS( ProxyPanel, wxPanel )


/*!
 * ProxyPanel event table definition
 */

BEGIN_EVENT_TABLE( ProxyPanel, wxPanel )

////@begin ProxyPanel event table entries
////@end ProxyPanel event table entries

END_EVENT_TABLE()


/*!
 * ProxyPanel constructors
 */

ProxyPanel::ProxyPanel()
{
    Init();
}

ProxyPanel::ProxyPanel( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    Init();
    Create(parent, id, caption, pos, size, style);
}


/*!
 * ProxyPanel creator
 */

bool ProxyPanel::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin ProxyPanel creation
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    wxPanel::Create( parent, id, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end ProxyPanel creation
    return true;
}


/*!
 * ProxyPanel destructor
 */

ProxyPanel::~ProxyPanel()
{
////@begin ProxyPanel destruction
////@end ProxyPanel destruction
}


/*!
 * Member initialisation
 */

void ProxyPanel::Init()
{
////@begin ProxyPanel member initialisation
////@end ProxyPanel member initialisation
}


/*!
 * Control creation for ProxyPanel
 */

void ProxyPanel::CreateControls()
{    
////@begin ProxyPanel content construction
    ProxyPanel* itemPanel1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemPanel1->SetSizer(itemBoxSizer2);

    wxRadioButton* itemRadioButton3 = new wxRadioButton( itemPanel1, ID_RADIOBUTTON, _("Direct Connection"), wxDefaultPosition, wxDefaultSize, 0 );
    itemRadioButton3->SetValue(false);
    itemBoxSizer2->Add(itemRadioButton3, 0, wxALIGN_LEFT|wxALL, 5);

    wxRadioButton* itemRadioButton4 = new wxRadioButton( itemPanel1, ID_RADIOBUTTON1, _("Use Internet Explorer Setting"), wxDefaultPosition, wxDefaultSize, 0 );
    itemRadioButton4->SetValue(false);
    itemBoxSizer2->Add(itemRadioButton4, 0, wxALIGN_LEFT|wxALL, 5);

    wxRadioButton* itemRadioButton5 = new wxRadioButton( itemPanel1, ID_RADIOBUTTON2, _("Use HTTP/FTP proxy"), wxDefaultPosition, wxDefaultSize, 0 );
    itemRadioButton5->SetValue(false);
    itemBoxSizer2->Add(itemRadioButton5, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5);

    wxStaticBox* itemStaticBoxSizer6Static = new wxStaticBox(itemPanel1, wxID_ANY, wxEmptyString);
    wxStaticBoxSizer* itemStaticBoxSizer6 = new wxStaticBoxSizer(itemStaticBoxSizer6Static, wxHORIZONTAL);
    itemBoxSizer2->Add(itemStaticBoxSizer6, 0, wxALIGN_LEFT|wxLEFT, 20);

    wxFlexGridSizer* itemFlexGridSizer7 = new wxFlexGridSizer(0, 2, 0, 0);
    itemFlexGridSizer7->AddGrowableCol(1);
    itemStaticBoxSizer6->Add(itemFlexGridSizer7, 1, wxGROW|wxALL, 0);

    wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("Proxy Host"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer7->Add(itemStaticText8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxTextCtrl* itemTextCtrl9 = new wxTextCtrl( itemPanel1, ID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(250, -1), 0 );
    itemFlexGridSizer7->Add(itemTextCtrl9, 1, wxGROW|wxGROW|wxALL, 5);

    wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("Port"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer7->Add(itemStaticText10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxTextCtrl* itemTextCtrl11 = new wxTextCtrl( itemPanel1, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer7->Add(itemTextCtrl11, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

////@end ProxyPanel content construction
}


/*!
 * Should we show tooltips?
 */

bool ProxyPanel::ShowToolTips()
{
    return true;
}

/*!
 * Get bitmap resources
 */

wxBitmap ProxyPanel::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin ProxyPanel bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end ProxyPanel bitmap retrieval
}

/*!
 * Get icon resources
 */

wxIcon ProxyPanel::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin ProxyPanel icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end ProxyPanel icon retrieval
}
